Repository navigation
Let vehicles of the cooperative crossing fail - #25
Merged
Merged
Conversation
The safety gaps of the signal-free crossing are sized for a vehicle that fails, and no run ever showed one. A vehicle can now be made to fail: it stops dead, the failure the fail-safe and mitigated gaps are sized for, or brakes as hard as it can to a stop, the failure the nominal gap is sized for. It fails where it is, at a chosen place, at random places in the box, or at the worst moment for crossing traffic. Half a second later (two message latencies and the actuation delay) the manager reacts with new trajectories. A vehicle that can still stop short of the box loses its crossing. One that cannot brakes as hard as it can if the failed vehicle is in a zone on its path, or follows the vehicle ahead until it rests behind it. A reaction only holds a vehicle back: one at rest stays at rest, and one that can no longer stop short of the box is never faster than the trajectory it had. A vehicle that cannot stop behind the one ahead is expected to come to rest against it, so the zones it will stand in are held from the failure on. Vehicles whose paths stay clear cross as planned. Vehicles that cannot stop in time touch: they stop where they touch, are disabled too, and the speed at which they closed is recorded. Disabled vehicles are cleared away after a set time, vehicles that stopped in the box are routed out once their way is clear, and the lanes that stay clear are served meanwhile. The app gets a Failures group (the kind of failure, a tool and two buttons that make one, how long a disabled vehicle stays and a rate of random failures), a Failures block under the safety monitors and marks on the map. examples/failures.rs measures what each gap policy survives and what a failure costs. Tests: tests/failures.rs (20 tests), six unit tests in sim/coop/failures.rs and one in gui/mod.rs, six more tests of the app in tests/gui.rs and one scripted scene in tests/scripted.rs. Signed-off-by: Jim Schreckengast <schreck@gmail.com>
README: the feature in the cooperative crossing's table, what the failures study found (examples/failures.rs, 400 failures per case) and how to watch one. docs/insights.md adds the findings to section 8, and docs/cooperative-intersections.md says what was built and what it measured in section 12. docs/architecture.md describes the model (section 6.11), the app's controls and panel (section 9.4), the tests and the scripted settings that made the new pictures, and has its counts of lines and tests brought up to date. Statements elsewhere that a failing vehicle makes untrue are corrected with it: the list of reasons, the table of random-number streams, what the status overlay shows and what needs a pointer. ACCESSIBILITY.md covers the new controls, colors and blinking marks. ROADMAP.md no longer lists a vehicle stalled in the box as untested. GOVERNANCE.md and CONTRIBUTING.md name the one exception to the rule that vehicles never overlap: a vehicle made to fail, where each contact is recorded with its speed. docs/cooperative.png is retaken because the left panel gained a group, and packaging/README.md loses a British spelling. Signed-off-by: Jim Schreckengast <schreck@gmail.com>
The app's label for the nominal gap read "Nominal: latency and actuation (no failures)". With failures in the model that is wrong: the gap is the two message latencies and the actuation delay, sized for a vehicle ahead that brakes hard to a stop and not for one that stops dead, and the failures study shows what happens when one does. The label now reads "Nominal: latency and actuation only", and docs/architecture.md quotes it so in sections 6.11 and 9.4. Signed-off-by: Jim Schreckengast <schreck@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The safety gaps of the signal-free cooperative crossing are sized for a vehicle that fails, and until now no run showed one. This lets a vehicle fail and shows what follows.
GOVERNANCE.mdandCONTRIBUTING.mdnow say so.examples/failures.rsmeasures what each gap policy survives and what a failure costs.The last commit changes the nominal gap's label from "Nominal: latency and actuation (no failures)" to "Nominal: latency and actuation only", since the gap is now documented as sized for a vehicle ahead that brakes hard, not for one that stops dead.
A run in which nothing fails is unchanged:
cargo run --release --bin bench all 20 6prints the same figures onmainand on this branch, the cooperative crossing included.Results
From
cargo run --release --example failures -- 400(one failure per run, 400 runs per case; batches at 16,000 veh/h, first come, first served at 8,000 veh/h):The README has the full tables, under What the safety gap is for and Results.
docs/insights.mdgives the findings in section 8, anddocs/cooperative-intersections.mdsets them against the design's estimates in section 12.Checklist
cargo test --locked --releasepasses (zero vehicle overlaps)cargo fmt --allcargo clippy --locked --release --all-targets -- -D warningsis clean (and forwasm32-unknown-unknownif the app changed)THIRD_PARTY_LICENSES.mdis regenerated (none)git commit -s) under the Developer Certificate of OriginNot tested before opening: Linux and Windows. The tests ran on macOS with Rust 1.99 and 1.100. Several of the new tests check what happens in runs with fixed seeds, which could come out differently on another platform.
By submitting this pull request, I agree that my contribution is dual licensed under MIT OR Apache-2.0, as described in CONTRIBUTING.md.